package com.lyl.momanapp.frament;

import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;

import com.lyl.momanapp.R;
import com.lyl.momanapp.adapter.OneOneAdapter;
import com.lyl.momanapp.adapter.OneOneimgAdapter;
import com.lyl.momanapp.util.view.MyFragment;

/**
 * 名字 梁亚龙
 * 时间 2017/9/11.
 * QQ邮箱 503934353@qq.com
 */

public class OneOne1 extends MyFragment {
    private RecyclerView mRl;
    private RecyclerView mRlimg;
    private OneOneAdapter mOneOneAdapter;
    private OneOneimgAdapter mOneOneimgAdapter;
    private ImageView mImg;

    @Override
    public void onClick(View view) {

    }

    @Override
    public int inflaterRootView() {
        return R.layout.frament_one_one;
    }

    @Override
    public void initUI() {
        mRl = ((RecyclerView) findView(R.id.lian_dong_rl_name));
        mRlimg = ((RecyclerView) findView(R.id.lian_dong_rl_img));
        mImg = ((ImageView) findView(R.id.frament_one_one_img));
    }

    @Override
    public void initData() {


    }

    @Override
    public void addListeners() {
        LinearLayoutManager linearLayoutManager = new LinearLayoutManager(getActivity(), LinearLayoutManager.HORIZONTAL, false);
        mRl.setLayoutManager(linearLayoutManager);
        mRl.setHasFixedSize(true);
        mOneOneAdapter = new OneOneAdapter(new String[]{"脸型", "脸型", "脸型", "脸型", "脸型", "脸型", "脸型"});
        mRl.setAdapter(mOneOneAdapter);
        mOneOneAdapter.setOnItemClickLitener(new OneOneAdapter.OnItemClickLitener() {
            @Override
            public void onItemClick(TextView view, int position) {

            }
        });


        LinearLayoutManager linearLayoutManager2 = new LinearLayoutManager(getActivity(), LinearLayoutManager.HORIZONTAL, false);
        mRlimg.setLayoutManager(linearLayoutManager2);
        mRlimg.setHasFixedSize(true);
        mOneOneimgAdapter= new OneOneimgAdapter(new String[]{"1", "2", "3", "3", "3", "3", "3"});
        mRlimg.setAdapter(mOneOneimgAdapter);
//        mOneOneimgAdapter.setOnItemClickLitener(new OneOneimgAdapter.OnItemClickLitener() {
//            @Override
//            public void onItemClick(ImageView view, int position) {
//
//            }
//        });
    }
}
